home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.iso / Demos / FarCry / Data1.cab / _4B6028C9A29443038EB64A631DA57045 < prev    next >
Encoding:
Text File  |  2004-01-06  |  3.1 KB  |  87 lines

  1. --------------------------------------------------
  2. --    Created By: Alberto
  3. --   Description: <short_description>
  4. --------------------------
  5. --
  6.  
  7. AIBehaviour.Drone = {
  8.     Name = "Drone",
  9.     pathname = "",
  10.  
  11.     -- SYSTEM EVENTS            -----
  12.     ---------------------------------------------
  13.     OnSelected = function( self, entity )    
  14.     end,
  15.     ---------------------------------------------
  16.     OnSpawn = function( self, entity )
  17.         -- called when enemy spawned or reset
  18.         AI:CreateGoalPipe("approachandfire");
  19.         AI:PushGoal("approachandfire","firecmd",0,1);
  20.         AI:PushGoal("approachandfire","approach",1,0.5);
  21.         AI:PushGoal("approachandfire","timeout",1,1);
  22.         
  23.         entity:SelectPipe(0,"approachandfire");
  24.     end,
  25.     ---------------------------------------------
  26.     OnActivate = function( self, entity )
  27.         -- called when enemy receives an activate event (from a trigger, for example)
  28.     end,
  29.     ---------------------------------------------
  30.     OnNoTarget = function( self, entity )
  31.         -- called when the enemy stops having an attention target
  32.     end,
  33.     ---------------------------------------------
  34.     OnPlayerSeen = function( self, entity, fDistance )
  35.         -- called when the enemy sees a living player
  36.             entity:SelectPipe(0,"approachandfire");
  37.     end,
  38.     ---------------------------------------------
  39.     OnEnemySeen = function( self, entity )
  40.         -- called when the enemy sees a foe which is not a living player
  41.         entity:SelectPipe(0,"approachandfire");
  42.     end,
  43.     ---------------------------------------------
  44.     OnFriendSeen = function( self, entity )
  45.         -- called when the enemy sees a friendly target
  46.         entity:SelectPipe(0,"approachandfire");
  47.     end,
  48.     ---------------------------------------------
  49.     OnDeadBodySeen = function( self, entity )
  50.         -- called when the enemy a dead body
  51.     end,
  52.     ---------------------------------------------
  53.     OnEnemyMemory = function( self, entity )
  54.         -- called when the enemy can no longer see its foe, but remembers where it saw it last
  55.     end,
  56.     ---------------------------------------------
  57.     OnInterestingSoundHeard = function( self, entity )
  58.         -- called when the enemy hears an interesting sound
  59.         entity:SelectPipe(0,"approachandfire");
  60.     end,
  61.     ---------------------------------------------
  62.     OnThreateningSoundHeard = function( self, entity )
  63.         -- called when the enemy hears a scary sound
  64.         entity:SelectPipe(0,"approachandfire");
  65.     end,
  66.     ---------------------------------------------
  67.     OnReload = function( self, entity,sender )
  68.         -- called when the enemy goes into automatic reload after its clip is empty
  69.     end,
  70.     ---------------------------------------------
  71.     OnClipNearlyEmpty = function( self, entity, sender )
  72.         -- called when the enemy has less than 30% left in his clip
  73.     end,
  74.     ---------------------------------------------
  75.     OnGroupMemberDied = function( self, entity )
  76.         -- called when a member of the group dies
  77.     end,
  78.     ---------------------------------------------
  79.     OnNoHidingPlace = function( self, entity, sender )
  80.         -- called when no hiding place can be found with the specified parameters
  81.     end,    
  82.     ---------------------------------------------
  83.     OnReceivingDamage = function ( self, entity, sender)
  84.         -- called when the enemy is damaged
  85.     end,
  86.  
  87. }